package com.ccnf.model.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.annotations.Version;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author developer
 * @since 2018-06-07
 */
@TableName("comment_thumbs")
@Data
public class CommentThumbs extends Model<CommentThumbs> {
    private static final long serialVersionUID = 1L;

    /**
     * 评论ID
     */
    @ApiModelProperty("评论ID")
    @TableId("comment_id")
    private Long commentId;
    /**
     * 点赞的用户ID
     */
    @ApiModelProperty("点赞的用户ID")
    @TableField("user_id")
    private Long userId;
    /**
     * 点赞时间
     */
    @ApiModelProperty(value = "点赞时间", hidden = true)
    @TableField("thumbs_time")
    private Long thumbsTime;
    /**
     * 是否点赞（0：点赞取消，1：已点赞）
     */
    @ApiModelProperty("是否点赞")
    @TableField("is_thumbs")
    private Integer isThumbs;
    /**
     * 乐观锁版本号字段
     */
    @Version
    @TableField
    @ApiModelProperty(value = "乐观锁版本号字段", hidden = true)
    private Integer version;

    @Override
    protected Serializable pkVal() {
        return this.commentId;
    }
}